l = [('Bob', 75), ('Adam', 92), ('Bart', 66), ('Lisa', 88)]
def by_name(t):
    return t[0]

def by_score(s):
    return s[1]

l2 = sorted(l,key=by_name)
l3 = sorted(l,key=by_score)

print(l2)   
print(l3)